import { EventConfig } from "@/engine/event/EventConfig";
import { EventManager } from "@/engine/event/EventManager";
import { Logger } from "@/engine/util/Logger";

export class UIHelper {

    public static Msg_Type = {
        success: "success",
        warning: "warning",
        normal: "normal",
        error: "error",
    }

    public static showMsg(msg: string = "", msgType: string = UIHelper.Msg_Type.success) {
        Logger.log("UIHelper showMsg===msg=", msg, msgType);
        EventManager.instance.dispatch(EventConfig.Event_Config.Msg, msg, msgType)
    }

    public static logout() {
        EventManager.instance.dispatch(EventConfig.Event_Config.Logout)
    }


}